import {BaseEntity, Column, Entity, Index, JoinColumn, JoinTable, ManyToMany, ManyToOne, OneToMany, OneToOne, PrimaryColumn, PrimaryGeneratedColumn, RelationId} from 'typeorm';

@Entity('fa_test', {schema: 'fastadmin' } )
export class fa_test {

    @PrimaryGeneratedColumn({
        type: 'int',
        name: 'id',
        })
    id: number;

    @Column('int', {
        nullable: false,
        default: () => '\'0\'',
        name: 'admin_id',
        })
    admin_id: number;

    @Column('int', {
        nullable: false,
        default: () => '\'0\'',
        name: 'category_id',
        })
    category_id: number;

    @Column('varchar', {
        nullable: false,
        length: 100,
        name: 'category_ids',
        })
    category_ids: string;

    @Column('enum', {
        nullable: false,
        enum: ['monday', 'tuesday', 'wednesday'],
        name: 'week',
        })
    week: string;

    @Column('enum', {
        nullable: false,
        name: 'flag',
        })
    flag: string;

    @Column('enum', {
        nullable: false,
        default: () => '\'male\'',
        enum: ['male', 'female'],
        name: 'genderdata',
        })
    genderdata: string;

    @Column('enum', {
        nullable: false,
        name: 'hobbydata',
        })
    hobbydata: string;

    @Column('varchar', {
        nullable: false,
        length: 50,
        name: 'title',
        })
    title: string;

    @Column('text', {
        nullable: false,
        name: 'content',
        })
    content: string;

    @Column('varchar', {
        nullable: false,
        length: 100,
        name: 'image',
        })
    image: string;

    @Column('varchar', {
        nullable: false,
        length: 1500,
        name: 'images',
        })
    images: string;

    @Column('varchar', {
        nullable: false,
        length: 100,
        name: 'attachfile',
        })
    attachfile: string;

    @Column('varchar', {
        nullable: false,
        length: 100,
        name: 'keywords',
        })
    keywords: string;

    @Column('varchar', {
        nullable: false,
        name: 'description',
        })
    description: string;

    @Column('varchar', {
        nullable: false,
        length: 100,
        name: 'city',
        })
    city: string;

    @Column('varchar', {
        nullable: true,
        name: 'json',
        })
    json: string | null;

    @Column('float', {
        nullable: false,
        default: () => '\'0.00\'',
        precision: 10,
        scale: 2,
        name: 'price',
        })
    price: number;

    @Column('int', {
        nullable: false,
        default: () => '\'0\'',
        name: 'views',
        })
    views: number;

    @Column('date', {
        nullable: true,
        name: 'startdate',
        })
    startdate: string | null;

    @Column('datetime', {
        nullable: true,
        name: 'activitytime',
        })
    activitytime: Date | null;

    @Column('year', {
        nullable: true,
        name: 'year',
        })
    year: number | null;

    @Column('time', {
        nullable: true,
        name: 'times',
        })
    times: string | null;

    @Column('int', {
        nullable: true,
        name: 'refreshtime',
        })
    refreshtime: number | null;

    @Column('int', {
        nullable: true,
        name: 'createtime',
        })
    createtime: number | null;

    @Column('int', {
        nullable: true,
        name: 'updatetime',
        })
    updatetime: number | null;

    @Column('int', {
        nullable: true,
        name: 'deletetime',
        })
    deletetime: number | null;

    @Column('int', {
        nullable: false,
        default: () => '\'0\'',
        name: 'weigh',
        })
    weigh: number;

    @Column('tinyint', {
        nullable: false,
        width: 1,
        default: () => '\'0\'',
        name: 'switch',
        })
    switch: boolean;

    @Column('enum', {
        nullable: false,
        default: () => '\'normal\'',
        enum: ['normal', 'hidden'],
        name: 'status',
        })
    status: string;

    @Column('enum', {
        nullable: false,
        default: () => '\'1\'',
        enum: ['0', '1', '2'],
        name: 'state',
        })
    state: string;

}
